package com.ant.storage.service.impl;

import com.ant.storage.common.ResultPage;
import com.ant.storage.dto.PurchaserDto;
import com.ant.storage.pojo.PurchaserSubscribe;
import com.ant.storage.mapper.PurchaserMapper;
import com.ant.storage.service.IPurchaserSubscribeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;


/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author melon
 * @since 2022-04-13
 */
@Service
public class PurchaserSubscribeServiceImpl extends ServiceImpl<PurchaserMapper, PurchaserSubscribe> implements IPurchaserSubscribeService {

    @Override
    public ResultPage getPurchaserPage(PurchaserDto purchaserDto) {
        PageHelper.startPage(purchaserDto.getPageIndex(),purchaserDto.getPageSize());
        PageInfo<PurchaserSubscribe> info=new PageInfo<>(this.baseMapper.selectList(null));
        return new ResultPage(info);
    }
}
